// 初始化按钮状态
/**
 *
 * @param isEdit 是否编辑状态
 * @param isEmptyPsn  nextprops 的selectedPsn是否为空
 */
export default function updateSubButtonStatus(isEdit, isEmptyPsn) {
    const {selectedPsn} = this.props;
    this.props.button.setButtonDisabled({
        addline: isEmptyPsn || !selectedPsn || isEdit,
        save: !isEdit,
        cancel: !isEdit
    });

    this.props.button.setButtonVisible({
        editline: false,
        deleteline: false,
        partchg: false
    });
}
